﻿// -----------------------------------------------------------------------
// <copyright file="ParseProject.cs" company="Microsoft">
// TODO: Update copyright text.
// </copyright>
// -----------------------------------------------------------------------

namespace Raop.Library.Aop
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Raop.Library.Tools;
    using System.IO;
    using Roslyn.Compilers.CSharp;
    using Roslyn.Compilers;
    using Raop.Library.Aop.PointCut;

    /// <summary>
    /// TODO: Update summary.
    /// </summary>
    public class ParseSolution
    {
        public string SolutionName { get; private set; }

        public ParseSolution(string solutionName)
        {
            this.SolutionName = solutionName;
        }
        
        [Inject]
        public void Run()
        {
            var solution = new SolutionReader(this.SolutionName);

            foreach (var item in solution.GetProjects())
            {
                var project = new ParseProject(item);
                project.Run();
            }
        }
    }
}
